﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Framework;

namespace Enterprise.Admin.Handle.BusinessCardCategory
{
    public partial class Delete : AdminBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            object result;
            try
            {
                var id = Fq("id").SafeToInt();
                var businessCardCategoryService = new BusinessCardCategoryService();
                businessCardCategoryService.Delete(id);
                result = new {state = true, message = "删除成功！"};
            }
            catch (Exception ex)
            {
                result = new {state = false, message = ex.Message};
            }
            Json(result);
        }
    }
}